<? if ($c = stack('name')) {

	addScriptLink('jquery.history');
	addScriptLink('jquery.sbx');

//	$d = component_data($c); 
	$s = component_settings($c);
	
	?><div id="cpn-<?=$c?>" class="catalog-list"><div class="catalog-list-content"><?

		?><div class="caption"><?=$s['caption']?></div><?
		
		foreach($d = component_data($c) as $id => $v) {
			$url = ($s['param'] == 'id') ? "#$id" : "#$s[param]-$id";
			
			?><div class="block"><?
			
				$image_large = $v['image-large'] ? $v['image-large']['fn'] : '';

				?><a href="<?=$url?>/" title="<?=h($v['title'])?>" class="title link" data-id="<?=$id?>" data-article="<?=h($v['article'])?>" data-image="<?=$image_large?>" data-description="<?=h($v['body'])?>"><span><?=$v['title']?></span></a><?

				?><a href="<?=$url?>/" title="<?=h($v['title'])?>" class="description link" data-article="<?=h($v['article'])?>" data-image="<?=$image_large?>" data-description="<?=h($v['body'])?>"><?=$v['body']?></a><?
			
				if ($v['image']) {
					if ($v['article']) {
						?><a href="<?=$url?>" title="<?=h($v['title'])?>" id="<?=$id?>" class="image link" data-article="<?=h($v['article'])?>" data-image="<?=$image_large?>" data-description="<?=h($v['body'])?>"><?
					} else {
						?><div class="image"><?
					}
					
					?><img src="<?=$v['image']['fn']?>" alt="<?=h($v['title'])?>" width="<?=$v['image']['x']?>" height="<?=$v['image']['y']?>" /><span class="action"></span><?
						
					if ($v['article']) {
						?></a><?
					} else {
						?></div><?
					}
				}

				if ($v['price']) {
					?><span class="price"><?="<strong>$v[price]</strong> $DATA[currency]"?></span><?
				}
				
				if (xmeta('cart') == 'enabled') {
					?><a href="#" class="cartAdd" data-id="<?=$id?>" data-name="<?=h($v['title'])?>" data-price="<?=h($v['price'])?>" title="Добавить в корзину">Добавить в корзину</a><?
				}
			?></div><?
		} 
		
		?><div class="clearer"></div><?
	
	?></div></div><?
	
	unstack();
} ?>